package com.freemaster.service.impl;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.test.context.TestContext;
import org.springframework.test.context.TestExecutionListener;
import org.springframework.transaction.annotation.Transactional;

import com.freemaster.mapper.TestMapper;
import com.freemaster.service.TestService;

@Service
@Transactional(readOnly=true)
public class TestServiceImpl implements TestService {

	Logger logger = LoggerFactory.getLogger(TestServiceImpl.class);
	
	@Autowired
	TestMapper testMapper;
	
	@Override
	@Cacheable(value="sysCache",key="'get'+#key")
	public List<Map<String, Object>> findAll(String key) {
		logger.info("testService.findAll is readOnly");
		return testMapper.findAll();
		 
	}

 

}
